package com.twt.recruit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.twt.recruit.entity.CategoryInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryInfoMapper extends BaseMapper<CategoryInfo> {

    @Select("select distinct application_id from application_info where status = #{status} and application_id in (select category_info.application_id from category_info where category_id = #{categoryId})")
    List<Integer> getApplicationIdsByCategoryId(Integer categoryId, Integer status);

    void delCategoryInfoByCategoryId(List<Integer> categoryList);
}
